const app = getApp();
Page({
  data: {
    showMask:false,
    isIphoneX:false
  },
  onLoad: function (options) {
  },
  onShow(){
    this.setData({
      isIphoneX: app.data.isIPhoneX
    })

  },
  onShareAppMessage(res) {
    const index = ~~(Math.random() * app.data.shareTpls.length)
    return {
      title: app.data.shareTpls[index],
      path: `/pages/index/index`,
      imageUrl: app.data.img[index % app.data.img.length],
      success: function () {
      }
    }
  },
  getuserinfo(ops){
    app.globalData.userInfo = ops.detail.userInfo;
    wx.navigateTo({
      url: '/pages/question/question',
    })
  },
  toOtherMiniPro(){
    wx.navigateToMiniProgram({
      appId: 'wx011a82fedef36d59', // 要跳转的小程序的appid
      path: 'pages/index/index', // 跳转的目标页面
      extarData: {
        open: 'auth'
      },
      success(res) {
        // 打开成功  
      }
    }) 
  },
  showMaskFn(){
    this.setData({
      showMask:true
    })
  },
  maskGoOn(){
    this.setData({
      showMask: false
    })
  }
  
})
